package com.currency.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.Map;

public interface NormalMapper extends BaseMapper {
    @Select("select shipment_id,all_fee,transport_price,coal_type,weight,volume from wyt_waybill where id=#{id}")
    Map<String, Object> queryWayBillInfo(@Param("id") String id);

    @Update("update wyt_order set status='3' where id=#{id}")
    int updateOrderStatusToWaitPay(@Param("id") String id);

    @Update("update wyt_order set status='5' where id=#{id}")
    int updateOrderStatusToFinished(@Param("id") String id);

    @Select("select id,goods_id,status,driver_id,shipper_id from wyt_order where id=#{id}")
    Map<String, Object> queryOrder(@Param("id") String id);

    @Select("select id,monthly_deposit,is_monthly_client from wyt_shipment where id=#{id}")
    Map<String, Object> queryShipmentInfo(@Param("id") long id);
}
